import { pickerOptionsStatic } from '@/utils/config'
export const formItems = [
  {
    filed: 'name',
    type: 'input',
    label: '活动名称'
  },
  {
    filed: 'businessType',
    type: 'select',
    label: '商品类型',
    clearable: true,
    options: [
      { value: '', label: '全部类型' },
      { value: '04', label: '套餐' },
      { value: '07', label: '课程' },
      { value: '19', label: '专项卡' }
    ]
  },
  {
    filed: 'status',
    type: 'select',
    label: '状态',
    clearable: true,
    options: [
      { value: '', label: '全部' },
      { value: '0', label: '未开始' },
      { value: '1', label: '进行中' },
      { value: '2', label: '已结束' }
    ]
  },
  {
    filed: 'venueId',
    type: 'select',
    label: '适用场馆',
    clearable: true,
    options: []
  }
]
export const queryFormConfig = {
  formItems,
  online: true
}

export const rules = {
  businessType: [{ required: true, message: '请选择', trigger: 'change' }],
  businessId: [{ required: true, message: '请选择', trigger: 'change' }],
  venueId: [{ required: true, message: '请选择', trigger: 'change' }],
  limitCount: [{ required: true, message: '请选择', trigger: 'change' }],
  personLimit: [{ required: true, message: '请选择', trigger: 'change' }],
  virtual: [{ required: true, message: '请选择', trigger: 'change' }],

  selTime: [{ required: true, message: '请选择', trigger: 'change' }],
  virtualTime: [{ required: true, message: '请选择', trigger: 'change' }],

  name: [{ required: true, message: '请输入', trigger: 'blur' }],
  maxCount: [{ required: true, message: '请输入', trigger: 'blur' }],
  personLimitCount: [{ required: true, message: '请输入', trigger: 'blur' }]
}

export const activityPropList = [
  { label: '会员信息', prop: 'memberInfo', minWidth: 200 },
  { label: '活动商品', prop: 'businessName', minWidth: 100 },
  { label: '销售价', prop: 'secOldPrice', minWidth: 80 },
  { label: '秒杀价(元)', prop: 'discountPrice', minWidth: 90 },
  { label: '交易方式', prop: 'payMethodName', minWidth: 80 },
  { label: '交易渠道', prop: 'channelTypeName', minWidth: 80 },
  { label: '创建时间', prop: 'createTime', minWidth: 160 },
  { label: '状态', prop: 'payStatusName', minWidth: 100 }
]
export const orderFormItems = [
  {
    filed: 'orderId',
    type: 'input',
    label: '订单号'
  },
  {
    filed: 'memberInfo',
    type: 'input',
    placeholder: '会员名称/手机号/卡号',
    label: '会员信息'
  },
  {
    filed: 'selTime',
    type: 'daterange',
    label: '创建时间',
    pickerOptions: pickerOptionsStatic
  },
  {
    filed: 'payStatus',
    type: 'select',
    label: '订单状态',
    clearable: true,
    labelCode: 'name',
    options: []
  },
  {
    filed: 'creator',
    type: 'input',
    label: '操作人'
  }
]
export const orderFormConfig = {
  formItems: orderFormItems,
  online: true
}

// 订阅
export const subscripPropList = [
  { label: '会员信息', prop: 'memberInfo', minWidth: 180 },
  { label: '活动名称', prop: 'businessName', minWidth: 130 },
  { label: '是否成功参加活动', prop: 'isSuccess', minWidth: 150 },
  { label: '订阅时间', prop: 'createTime', minWidth: 180 }
]
export const subscripFormItems = [
  {
    filed: 'memberInfo',
    type: 'input',
    placeholder: '会员名称/手机号/卡号',
    label: '会员信息'
  },
  {
    filed: 'name',
    type: 'input',
    label: '活动名称'
  },
  {
    filed: 'selTime',
    type: 'datetimerange',
    label: '订阅时间',
    pickerOptions: pickerOptionsStatic
  },
  {
    filed: 'status',
    type: 'select',
    label: '参与情况',
    clearable: true,
    options: [
      { value: '0', label: '参与成功' },
      { value: '1', label: '参与失败' }
    ]
  }
]
export const subscripFormConfig = {
  formItems: subscripFormItems,
  online: true
}

